<% var pageLevelJS = { %>
<link rel="stylesheet" href="${plugin}/tool/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script  type="text/javascript" src="${plugin}/tool/zTree/js/jquery.ztree.core.min.js"></script>
<script  type="text/javascript" src="${plugin}/tool/zTree/js/jquery.ztree.excheck.min.js"></script>
<script type="text/javascript">
var settings = {
		 modelDomainFlag:"auth"
		,modelName:"账号"
		,modelFlag:"account"
		 ,key:"${sessionId}"
		,canUpdate:${shiro.hasPermission('sys_auth_account:update:*')}
		,canDelete:${shiro.hasPermission('sys_auth_account:delete:*')}
		,canRemove:${shiro.hasPermission('sys_auth_account:remove:*')}
		,canAdd:${shiro.hasPermission('sys_auth_account:add:*')}
		,canShowRole:${shiro.hasPermission('sys_auth_account:detail:*')}
		,canShowGroup:${shiro.hasPermission('sys_auth_account:detail:*')}
		,canDetail:${shiro.hasPermission('sys_auth_account:detail:*')}
		,canUpdateRole:${shiro.hasPermission('sys_auth_userrole:auth:*')}
		,canUpdateGroup:${shiro.hasPermission('sys_auth_usergroup:auth:*')}
		,person:${shiro.hasPermission('sys_auth_account_person:update:*') || shiro.hasPermission('sys_auth_account_person:detail:*')}
		}
window.global.hasInstance = ${sysFlags.~size>1};
</script> 
<script type="text/javascript" src="${ctx}/static/fw/js/fw-tree.js"></script>
<script type="text/javascript" src="${ctx}/static/fw/js/fw-inputTree.js"></script>
<script type="text/javascript" src="${ctx}/static/js/auth/account/index.js"></script>
<%};%> 
<% var form = { %>
		<form id="searchForm" action="${ctx}/auth/account/query?_style=bs&${session._para}" class="form-inline" role="form">
				   <%if(has(sysFlags) && sysFlags.~size>1){ %>
					   <div class="form-group  ">
					     <label for="categoryCode">所属系统:</label>
						 <select placeholder="类别" name="instanceId" class="form-control">
						    <option value="">--系统--</option>
							<% for(res in sysFlags!){ %>
							  <option value="${res.id}">${res.nameStr}</option>
						　　   <% } %>
						</select>
					  </div>
				   <%}else{%>
				       <input type="hidden"  name="instanceId" value="${sys_flag}">
				    <% } %>
				  <div class="form-group">
				     <label for="name" id="citySelLabel">所属机构:</label>
				     <span style="display: inline-block; position: relative; " >  
				    	 <input type="hidden" oldval=""  class="validate[maxSize[50]] treeValue" name="orgId" placeholder="">
					     <input type="text" class="validate[maxSize[50]]  treeSel readonly" readonly="readonly" placeholder="">
					     <a  href="javacript:void(0)">清空</a>
				         <div class="menuContent" treehide="true" style="display:none; position: absolute;z-index:50000">
							<ul id="org" treehide="true" class="ztree search-ztree" style="margin-top:0; width:160px;height: 200px;">
							</ul>
						</div>
				     </span>
				  </div>
				  <div class="form-group">
				     <label for="name">用户名:</label>
				     <input type="text" class="validate[maxSize[50]] form-control" name="name" placeholder="用户名">
				  </div>
				  <div class="form-group">
				     <label for="phone">联系电话:</label>
				     <input type="text" class="validate[maxSize[50]] form-control" name="phone" placeholder="联系电话" value="">
				  </div>
				  <div class="form-group">
				     <label for="startDate">创建日期:</label>
				     <input  style="height:32px;" class="Wdate form-control" type="text" name="createDtSt" id="startDate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endDate\')}'})"    placeholder="请输入开始日期"/>
				     <label for="endDate">至</label>
				     <input  style="height:32px;" class="Wdate form-control" type="text" name="createDtEd" id="endDate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'startDate\')}'})"    placeholder="请输入结束日期"/>
				  </div>
				  <div class="form-group">
				     <label for="startDate">最近访问日期:</label>
				     <input  style="height:32px;" class="Wdate form-control" type="text" name="loginDtSt" id="updatestartDate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'updateendDate\')}'})"    placeholder="请输入开始日期"/>
				     <label for="endDate">至</label>
				     <input  style="height:32px;" class="Wdate form-control" type="text" name="loginDtEd" id="updateendDate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'updatestartDate\')}'})"    placeholder="请输入结束日期"/>
				  </div>
				  <div class="form-group" >
				       <label for="validClass">有效区分:</label>
				 	   <div class="form-control" id="validClass"> 
					       <label class="">
					         <input type="radio" name="validClass" class="toggle" value="1">有效
					       </label>
					       <label class="">
					         <input type="radio" name="validClass" class="toggle" value="0">无效
					       </label>
					       <label class="">
					         <input type="radio" name="validClass" checked="checked" class="toggle" value="">全部
					       </label>
				       </div>
				</div>
				  <div class="form-group"  >
				       <label for="validClass">删除区分:</label>
				 	   <div class="form-control" id="deleteClass"> 
					       <label class="">
					         <input type="radio" name="deleteClass" class="toggle" value="1">已删除
					       </label>
					       <label class="">
					         <input type="radio" name="deleteClass" class="toggle" value="0">未删除
					       </label>
					       <label class="">
					         <input type="radio" name="deleteClass" checked="checked" class="toggle" value="">全部
					       </label>
				       </div>
				</div>
				
			</form>
<%};%> 

<% var toolbar = { %>
  				<%if(shiro.hasPermission('sys_auth_account:add:*')) {%>
  			    <button type="button" class="btn btn-primary btn-xs addBtn" title="新增" data-toggle="modal" data-target="#myModal">
  					<i class="ace-icon fa  fa-plus bigger-120"></i>新增 
  				</button> 
  				<%}%>
  				<%if(shiro.hasPermission('sys_auth_account:remove:*')||shiro.hasPermission('sys_auth_account:update:*')) {%>
  				<button type="button" class="btn btn-warning btn-xs removeBtn" title="将数据标识为删除状态">
  					<i class="ace-icon fa fa-trash-o bigger-120"></i>逻辑删除
  				</button> 
  				<%}%>
  				<%if(shiro.hasPermission('sys_auth_account:delete:*')) {%>
  				<button type="button" class="btn btn-danger btn-xs delBtn" title="物理删除数据">
  					<i class="ace-icon fa fa-trash-o bigger-120"></i>删除
  				</button> 
  				<%}%>
<div class="pull-right">
		    <button type="button" class="btn btn-info btn-xs tableBtn" title="控制非核心列">
		<i class="ace-icon fa bigger-120">隐藏</i>
	</button>
</div>
<%};%> 

<% var ths = { %>
      <th w_render="checkboxFunc" w_class="center" w_index="id" width="50px"><input type="checkbox"/></th>
                <th w_num="total_line" w_class="center hidden-480" width="50px">序号</th>
		        <th w_index="name" w_tip="true" >用户名</th>
		        <th w_index="nickName" w_tip="true" >昵称</th>
		        <th w_index="orgName" w_class="hidden-480" w_tip="true" >所属机构</th>
		       <%if(has(sysFlags) && sysFlags.~size>1){ %>
		        <th w_index="instance.nameStr" w_class="hidden-480" >所属系统</th>
		        <%}%>
		        <th w_index="loginDt" w_class="hidden-480"  width="130px">最近登录时间</th>
		        <th w_render="validClassFunc" w_class="hidden-480" w_index="validClass" width="120px">有效区分</th>
		        <th w_render="removeClassFunc" w_class="hidden-480"  w_index="deleteClass" width="120px">删除区分</th>
		        <th w_render="operateFunc" class="nodata width-480-ctr" w_index="id" w="120px" >操作</th>
<%};%> 
<% var layoutParas =
{"title":"",table:"searchTable",tableClass:"","ths":ths,"toolbar":toolbar,"form":form,"pageLevelJS":pageLevelJS};
layout("/WEB-INF/views/btl/template/backBasicGridTemplate.html", layoutParas){ %>
	
<%} %>
